home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / misc / math / Laplace.lha / Laplace / Install < prev    next >
Encoding:
Text File  |  1996-09-19  |  31.2 KB  |  879 lines

  1. ;------------------------------------------------------------------------
  2. ;
  3. ; Laplace Installation script
  4. ;
  5. ; $VER: Laplace-Install 1.2 (19.9.96)
  6. ;
  7. ; Script: (C)1996 by A Vision of Paradise
  8. ; Installer: (C)1996 ESCOM AG
  9. ; written by P!\K
  10. ;
  11. ;------------------------------------------------------------------------
  12.  
  13. ;-1- "language definitions"
  14. (if (= @language "deutsch")
  15.     (
  16. ;-1- "deutsch"
  17.         (set #lhapath-prompt "Lha wird benötigt! Wo befindet es sich?")
  18.         (set #lhapath-help (cat
  19.             "Lha wird benötigt, um die Installation durchzuführen. "
  20.             "Es wurde aber nicht im C: Verzeichnis gefunden!\n"
  21.             "Es ist der vollständige Pfad anzugeben, an dem es zu finden ist.\n"
  22.             "\n"
  23.             @askfile-help
  24.           )
  25.         )
  26.         (set #welcome "Willkommen bei der Installation von Laplace.")
  27.         (set #mode-prompt "")
  28.         (set #mode-help @askchoice-help)
  29.         (set #modeupdate-prompt (cat
  30.             "Welche Aktion willst Du ausführen?\n"
  31.             "Laplace V%s ist bereits in %s installiert."
  32.           )
  33.         )
  34.         (set #modeupdate-help @askchoice-help)
  35.         (set #mode-update "Laplace aktualisieren")
  36.         (set #mode-install "Laplace installieren")
  37.         (set #mode-deinstall "Laplace löschen")
  38.         (set #share-info (cat
  39.             "Wenn Dir dieses Programm gefällt, schicke mir bitte eine e-Mail oder Postkarte.\n"
  40.             "\n"
  41.             "e-mail:\n"
  42.             "bstegema@ix.urz.uni-heidelberg.de\n"
  43.             "\n"
  44.             "s-mail:\n"
  45.             "Benjamin Stegemann\n"
  46.             "Rohrbacher Str. 66\n"
  47.             "69115 Heidelberg\n"
  48.             "Germany"
  49.           )
  50.         )
  51.         (set #wrongversion (cat
  52.             "Dieses Skript benötigt den Installer V42.9 oder höher. "
  53.             "Er befinded sich im Verzeichnis Laplace/Tools und sollte eigentlich benutzt werden. "
  54.             "Falls Du ein Tool wie ToolAlias benutzt, kopiere diese Version als Deinen Standartinstaller. "
  55.           )
  56.         )
  57.         (set #wrongos (cat
  58.             "Laplace benötigt OS V39 oder besser.\n"
  59.             "Du hast V%ld.%ld installiert. Sorry."
  60.           )
  61.         )
  62.         (set #wrongmui (cat
  63.             "Laplace benötigt MUI V13 oder besser.\n"
  64.             "Du hast V%ld.%ld installiert. Sorry.\n\n"
  65.             "MUI ist im Aminet erhältlich:\n"
  66.             "dev/gui/muiXXusr.lha\n"
  67.             "Wobei XX die Versionsnummer ist."
  68.           )
  69.         )
  70.         (set #nomui (cat
  71.             "Laplace benötigt MUI V13 oder besser.\n"
  72.             "Zur Zeit ist MUI nicht installiert. Sorry.\n\n"
  73.             "MUI ist im Aminet erhältlich:\n"
  74.             "dev/gui/muiXXusr.lha\n"
  75.             "Wobei XX die Versionsnummer ist."
  76.           )
  77.         )
  78.         (set #wrongcpu (cat
  79.             "Laplace benötigt mindestens einen MC68020 Prozessor.\n"
  80.             "Du hast nur einen MC%s. Sorry."
  81.           )
  82.         )
  83.         (set #destdir-prompt "Wähle das Verzeichnis, wo Laplace installiert werden soll. Eine neue Schublade wird erzeugt.")
  84.         (set #destdir-help (cat
  85.             "Eine Schublade 'Laplace' wird ein gewählten Verzeichnis erzeugt, wo alle nötigen Dateien gespeichert werden.\n\n"
  86.             @askdir-help
  87.           )
  88.         )
  89.         (set #icontype-prompt "Wähle die Piktogramm Kollektion aus:")
  90.         (set #icontype-help @askchoice-help)
  91.         (set #icontype-std "4 Farben Standart")
  92.         (set #icontype-mwb "8 Farben MagicWB2")
  93.         (set #lang-prompt "Welche Sprachen sollen installiert werden?")
  94.         (set #langs-help @askoptions-help)
  95.         (set #docs-prompt "In welchen Formaten soll die Dokumentation installiert werden?")
  96.         (set #docs-help (cat
  97.             "AmigaGuide:\n"
  98.             "   Dies sollte immer installiert werden, da die Online-Hilfe mit diesem Format arbeitet.\n\n"
  99.             "ASCII:\n"
  100.             "   So kann die Dokumentation mit jedem Textanzeiger (z.B. MuchMore) angezeigt werden.\n\n"
  101.             "DVI:\n"
  102.             "   So kann die Dokumentation in hoher Qualität ausgedruckt werden. Dazu ist jedoch eine TeX-Installation nötig.\n\n"
  103.             @askoptions-help
  104.           )
  105.         )
  106.         (set #unpack-main "Entpacke Hauptprogram...")
  107.         (set #unpack-arexx "Entpacke ARexx Skripte...")
  108.         (set #unpack-cat "Entpacke Kataloge...")
  109.         (set #unpack-docs "Entpacke Dokumentation...")
  110.         (set #unpack-fonts "Entpacke Schriftarten...")
  111.         (set #unpack-libs "Entpacke Bibliotheken...")
  112.         (set #unpack-include "Entpacke Include-Dateien...")
  113.         (set #unpack-presets "Entpacke Einstellungen...")
  114.         (set #unpack-projects "Entpacke Projekte...")
  115.         (set #unpack-icons "Entpacke Piktogramme...")
  116.         (set #unpack-tools "Entpacke Extras...")
  117.         (set #unpack-error "Kann '%s' nicht entpacken.\nDOS Fehlerkode %ld.")
  118.         (set #copy-icons "Kopiere Piktogramme...")
  119.         (set #copy-more "Kopiere Dokumentanzeiger...")
  120.         (set #deldir-prompt "Wähle das Verzeichnis, wo Laplace installiert ist.")
  121.         (set #deldir-help @askdir-help)
  122.         (set #deinstall-finish "Laplace wurde aus dem Verzeichnis '%s' gelöscht.\n\nSchade, daß Laplace Dir nicht gefallen hat ;-(")
  123.         (set #deinstall-working "Laplace wird gelöscht...")
  124.         (set #deinstall-notfound "Laplace befindet sich nicht im gewählten Verzeichnis.")
  125.         (set #confirm-prompt (cat
  126.             "Soll Laplace wirklich gelöscht werden?\n"
  127.             "Die Daten gehen unwiederbringlich verloren!"
  128.           )
  129.         )
  130.         (set #confirm-help @askbool-help)
  131.         (set #parts-prompt "Welche Programmteile sollen installiert werden?")
  132.         (set #parts-help (cat
  133.             "Hauptprogramm:\n"
  134.             "  Laplace, was sonst...\n\n"
  135.             "Dokumentation:\n"
  136.             "  Programmdokumentation in AmigaGuide und ASCII...\n\n"
  137.             "Kataloge:\n"
  138.             "  Katalogdateien, um das Hauptprogramm an die gewählte Sprache anzupassen.\n\n"
  139.             "Standartpiktogramme:\n"
  140.             "  Piktogramme für ARexx-Skripte, Include-Dateien und Projekte.\n\n"
  141.             "Standartschriftarten:\n"
  142.             "  Du kannst eine eigene Schriftart einstellen, falls Du jedoch griechische Symbole nutzen willst, mußt Du diesen Teil installieren.\n\n"
  143.             "Beispiel ARexx-Skripte:\n"
  144.             "  einige Beispiel-Skripte, die die Möglichkeiten der ARexx-Schnittstelle zeigen sollen.\n\n"
  145.             "Include-Dateien:\n"
  146.             "  Bibliotheken mit externen Funktionen.\n\n"
  147.             "Standarteinstellungen:\n"
  148.             "  einige Einstellungsdateien..\n\n"
  149.             "Beipielprojekte:\n"
  150.             "  einige Projekte, die die Fähigkeiten von Laplace demonstrieren sollen.\n\n"
  151.             "Extras:\n"
  152.             "  Ein paar Hilfsprogramme, u.a. ein Skript, um die DVI Anleitung auszudrucken.\n\n"
  153.             @askoptions-help
  154.           )
  155.         )
  156.         (set #parts-main "Hauptprogramm")
  157.         (set #parts-docs "Dokumentaion")
  158.         (set #parts-cats "Kataloge")
  159.         (set #parts-icons "Standartpiktogramme")
  160.         (set #parts-fonts "Standartschriftarten")
  161.         (set #parts-arexx "Beipiels ARexx-Skripte")
  162.         (set #parts-include "Include Dateien")
  163.         (set #parts-presets "Standarteinstellungen")
  164.         (set #parts-projects "Beispielprojekte")
  165.         (set #parts-tools "Extras")
  166.         (set #del-obsolete "Lösche veraltete Dateien...")
  167. ;-2-
  168.     )
  169.     (if (= @language "pladd")
  170.         (
  171.             (abort "not implemented")
  172.         )
  173.         (
  174. ;-1- "english"
  175.             (set #lhapath-prompt "Lha is required! Where can I find it?")
  176.             (set #lhapath-help (cat
  177.                 "Lha is needed to perform the installation, "
  178.                 "but I could not be found in your C: directory.\n"
  179.                 "Please enter the complete path, where I can find it.\n"
  180.                 "\n"
  181.                 @askfile-help
  182.               )
  183.             )
  184.             (set #welcome "Welcome to the installation of Laplace.")
  185.             (set #mode-prompt "Which action should be performed?")
  186.             (set #mode-help @askchoice-help)
  187.             (set #mode-install "install Laplace")
  188.             (set #modeupdate-prompt (cat
  189.                 "Which action should be performed?\n"
  190.                 "Laplace V%s is already installed at %s."
  191.               )
  192.             )
  193.             (set #modeupdate-help @askchoice-help)
  194.             (set #mode-update "update Laplace")
  195.             (set #mode-install "install Laplace")
  196.             (set #mode-deinstall "remove Laplace")
  197.             (set #share-info (cat
  198.                 "If you like this program, please send me a e-mail or postcard.\n"
  199.                 "\n"
  200.                 "e-mail:\n"
  201.                 "bstegema@ix.urz.uni-heidelberg.de\n"
  202.                 "\n"
  203.                 "s-mail:\n"
  204.                 "Benjamin Stegemann\n"
  205.                 "Rohrbacher Str. 66\n"
  206.                 "69115 Heidelberg\n"
  207.                 "Germany"
  208.               )
  209.             )
  210.             (set #wrongversion (cat
  211.                 "This script need the installer V42.9 or better. "
  212.                 "It is provided in the Laplace/Tools directory and should be used. "
  213.                 "If you have a tool like ToolAlias installed, use this version as your standart."
  214.               )
  215.             )
  216.             (set #wrongos (cat
  217.                 "Laplace requires OS V39 or better.\n"
  218.                 "You have V%ld.%ld installed. Sorry."
  219.               )
  220.             )
  221.             (set #wrongmui (cat
  222.                 "Laplace requires MUI V13 or better.\n"
  223.                 "You have V%ld.%ld installed. Sorry.\n\n"
  224.                 "MUI can be found in Aminet:\n"
  225.                 "dev/gui/muiXXusr.lha\n"
  226.                 "where XX is the version number."
  227.               )
  228.             )
  229.             (set #nomui (cat
  230.                 "Laplace requires MUI V13 or better.\n"
  231.                 "Currently MUI is not installed. Sorry.\n\n"
  232.                 "MUI can be found in Aminet:\n"
  233.                 "dev/gui/muiXXusr.lha\n"
  234.                 "where XX is the version number."
  235.               )
  236.             )
  237.             (set #wrongcpu (cat
  238.                 "Laplace requires at least a MC68020 CPU.\n"
  239.                 "You have just a MC%s. Sorry."
  240.               )
  241.             )
  242.             (set #destdir-prompt "Select the directory where Laplace should be installed. A new drawer will be created.")
  243.             (set #destdir-help (cat
  244.                 "A drawer called 'Laplace' will be created in the selected directory, where all files are stored.\n\n"
  245.                 @askdir-help
  246.               )
  247.             )
  248.             (set #icontype-prompt "Select the icon collection you want to use:")
  249.             (set #icontype-help @askchoice-help)
  250.             (set #icontype-std "4 color standart")
  251.             (set #icontype-mwb "8 color MagicWB2")
  252.             (set #langs-prompt "Which languages should be installed?")
  253.             (set #langs-help @askoptions-help)
  254.             (set #docs-prompt "Which formats for the documentation should be installed?")
  255.             (set #docs-help (cat
  256.                 "AmigaGuide:\n"
  257.                 "   You should always install this, because the online-help need this format.\n\n"
  258.                 "ASCII:\n"
  259.                 "   With this format the documentation can be shown with every textdisplayer (e.g. MuchMore).\n\n"
  260.                 "DVI:\n"
  261.                 "   You can use this to print the documentation in high quality. But you need a TeX-installation for this.\n\n"
  262.                 @askoptions-help
  263.               )
  264.             )
  265.             (set #unpack-main "Decrunching main program...")
  266.             (set #unpack-arexx "Decrunching ARexx scripts...")
  267.             (set #unpack-cat "Decrunching catalogs...")
  268.             (set #unpack-docs "Decrunching documentation...")
  269.             (set #unpack-fonts "Decrunching fonts...")
  270.             (set #unpack-libs "Decrunching libraries...")
  271.             (set #unpack-include "Decrunching include files...")
  272.             (set #unpack-presets "Decrunching presets...")
  273.             (set #unpack-projects "Decrunching projects...")
  274.             (set #unpack-icons "Decrunching icons...")
  275.             (set #unpack-tools "Decrunching extras...")
  276.             (set #unpack-error "Unable to unpack '%s'.\nDOS error code %ld.")
  277.             (set #copy-icons "Copying icons...")
  278.             (set #copy-more "Copying text viewer...")
  279.             (set #deldir-prompt "Select the drawer where Laplace is installed.")
  280.             (set #deldir-help @askdir-help)
  281.             (set #deinstall-finish "Laplace has been removed from '%s'.\n\nToo bad that you didn't like Laplace ;-(")
  282.             (set #deinstall-working "Laplace is being erased...")
  283.             (set #deinstall-notfound "Laplace can't be found in the selected drawer.")
  284.             (set #confirm-prompt (cat
  285.                 "Do you really want to remove Laplace?\n"
  286.                 "All files are lost forever!!"
  287.               )
  288.             )
  289.             (set #confirm-help @askbool-help)
  290.             (set #parts-prompt "Which packages should be installed?")
  291.             (set #parts-help (cat
  292.                 "main program:\n"
  293.                 "  Laplace itself...\n\n"
  294.                 "documentation:\n"
  295.                 "  docs in AmigaGuide and ASCII...\n\n"
  296.                 "catalogs:\n"
  297.                 "  catalogs to adjust the main program to the selected language.\n\n"
  298.                 "default icons:\n"
  299.                 "  default icons for ARexx scripts, include files and projects.\n\n"
  300.                 "default fonts:\n"
  301.                 "  you may use your own font, but if you want to have greek, symbols you must install this package.\n\n"
  302.                 "example ARexx scripts:\n"
  303.                 "  some scripts to show the functions of the ARexx port.\n\n"
  304.                 "include files:\n"
  305.                 "  libraries containing external functions.\n\n"
  306.                 "default presets:\n"
  307.                 "  some preset files..\n\n"
  308.                 "example projects:\n"
  309.                 "  some projects to demonstrate the abilities of Laplace.\n\n"
  310.                 "extras:\n"
  311.                 "  some extra programs, among other things a script to print the DVI manual\n\n"
  312.                 @askoptions-help
  313.               )
  314.             )
  315.             (set #parts-icons "default icons")
  316.             (set #parts-main "main program")
  317.             (set #parts-docs "documentation")
  318.             (set #parts-cats "catalogs")
  319.             (set #parts-fonts "default fonts")
  320.             (set #parts-arexx "example ARexx scripts")
  321.             (set #parts-include "include files")
  322.             (set #parts-presets "default presets")
  323.             (set #parts-projects "example projects")
  324.             (set #parts-tools "extras")
  325.             (set #del-obsolete "Deleting obsolete files...")
  326. ;-2-
  327.         )
  328.     )
  329. )
  330. ;-2-
  331.  
  332. ;-1- "P_UNPACK"
  333. (procedure P_UNPACK #unpack-msg #unpack-src #unpack-dest
  334.     (working #unpack-msg)
  335.     (if (> (run ("%s x \"%s\" \"%s\"" #lhapath #unpack-src #unpack-dest)) 0)
  336.         (abort (#unpack-error #unpack-src #ioerr))
  337.     )
  338. )
  339. ;-2-
  340. ;-1- "P_COPYAS"
  341. (procedure P_COPYAS #copyas-src #copyas-dest #copyas-name
  342.     (copyfiles
  343.         (source #copyas-src)
  344.         (dest #copyas-dest)
  345.         (newname #copyas-name)
  346.         (nogauge)
  347.     )
  348. )
  349. ;-2-
  350.  
  351. ;-1- "P_INSTALL"
  352. ;-1- "P_INSTALL_CHECK"
  353. (procedure P_INSTALL_CHECK
  354.     ; We can't handle this script without Installer 42.9 or better!
  355.     (if (< @installer-version 2752521)
  356.         (abort #wrongversion)
  357.     )
  358.  
  359.     ; check OS
  360.     (set #os-version (getversion))
  361.     (if (< #os-version 2555904)
  362.         (abort (#wrongos (shiftright #os-version 16) (bitand #os-version 65535)))
  363.     )
  364.  
  365.     ; check MUI
  366.     (if (exists "MUI:Libs/muimaster.library" (noreq))
  367.         (set #mui-version (getversion "MUI:Libs/muimaster.library"))
  368.         (set #mui-version 0)
  369.     )
  370.     (if (< #mui-version 851968)
  371.         (abort (if (= #mui-version 0)
  372.                     #nomui
  373.                     (#wrongmui (shiftright #mui-version 16) (bitand #mui-version 65535))
  374.                )
  375.         )
  376.     )
  377.  
  378.     ; check CPU
  379.     (set #cpu-type (database "cpu"))
  380.     (if (patmatch "(68000|68010)" #cpu-type)
  381.         (abort (#wrongcpu #cpu-type))
  382.     )
  383. )
  384. ;-2-
  385. ;-1- "P_INSTALL_ASK"
  386. (procedure P_INSTALL_ASK
  387.     ; get path for Lha
  388.     (set #lhapath "c:Lha")
  389.  
  390.     (while (<> (exists #lhapath (noreq)) 1)
  391.            (
  392.                (if (= @user-level 0)
  393.                    (abort "Since I don't know who to force the Installer to ask you for the path of Lha, I must ask you not to use the Novice mode..\n\nSorry for the inconvenience.")
  394.                )
  395.                (set #lhapath (askfile
  396.                                 (prompt #lhapath-prompt)
  397.                                 (help #lhapath-help)
  398.                                 (default #lhapath)
  399.                              )
  400.                )
  401.            )
  402.     )
  403.  
  404.     ; get destination dir
  405.     (set #dest
  406.         (askdir
  407.             (prompt #destdir-prompt)
  408.             (help #destdir-help)
  409.             (default @default-dest)
  410.         )
  411.     )
  412.  
  413.     (set @default-dest #dest)
  414.  
  415.     ; get icons type
  416.     (set #icon-type
  417.         (if (>= @user-level 2)
  418.             (askchoice
  419.                 (prompt #icontype-prompt)
  420.                 (help #icontype-help)
  421.                 (choices #icontype-std #icontype-mwb)
  422.                 (default (if (= (getenv "MagicWB") "")
  423.                              0
  424.                              1
  425.                          )
  426.                 )
  427.             )
  428.             (if (= (getenv "MagicWB") "")
  429.                 0
  430.                 1
  431.             )
  432.         )
  433.     )
  434.  
  435.     ; select parts
  436.     (set #parts
  437.         (if (>= @user-level 2)
  438.             (askoptions
  439.                 (prompt #parts-prompt)
  440.                 (help #parts-help)
  441.                 (choices
  442.                     #parts-main
  443.                     #parts-docs
  444.                     #parts-cats
  445.                     #parts-icons
  446.                     #parts-fonts
  447.                     #parts-arexx
  448.                     #parts-include
  449.                     #parts-presets
  450.                     #parts-projects
  451.                     #parts-tools
  452.                 )
  453.             )
  454.             -1
  455.         )
  456.     )
  457.  
  458.     (if (in #parts 1)
  459.         (
  460.             ; get languages
  461.             (set #langs
  462.                 (if (>= @user-level 2)
  463.                     (askoptions
  464.                         (prompt #langs-prompt)
  465.                         (help #langs-help)
  466.                         (choices "english" "deutsch")
  467.                     )
  468.                     -1
  469.                 )
  470.             )
  471.  
  472.             ; get doc types
  473.             (set #docs
  474.                 (if (>= @user-level 2)
  475.                     (askoptions
  476.                         (prompt #docs-prompt)
  477.                         (help #docs-help)
  478.                         (choices "AmigaGuide" "ASCII" "DVI")
  479.                     )
  480.                     -1
  481.                 )
  482.             )
  483.         )
  484.     )
  485. )
  486. ;-2-
  487. ;-1- "P_INSTALL_PERFORM"
  488. (procedure P_INSTALL_PERFORM
  489.     (onerror
  490.         (
  491.             (delete (tackon #dest "T:Laplace_temp") (all))
  492.             (delete (tackon #dest "Laplace") (all))
  493.             (delete (tackon #dest "Laplace.info"))
  494.         )
  495.     )
  496.  
  497.     ; delete obsolete files
  498.     (working #del-obsolete)
  499.     (delete (tackon #dest "Libs/avop.library"))
  500.  
  501.     (P_UNPACK #unpack-icons
  502.               (select #icon-type
  503.                   "Data/Icons_std.lha"
  504.                   "Data/Icons_mwb.lha"
  505.               )
  506.               "T:Laplace_temp/"
  507.     )
  508.  
  509.     (makedir (tackon #dest "Laplace"))
  510.     (makedir (tackon #dest "Laplace/c"))
  511.     (makedir (tackon #dest "Laplace/ARexx"))
  512.     (makedir (tackon #dest "Laplace/Catalogs"))
  513.     (makedir (tackon #dest "Laplace/Docs"))
  514.     (makedir (tackon #dest "Laplace/Fonts"))
  515.     (makedir (tackon #dest "Laplace/Icons"))
  516.     (makedir (tackon #dest "Laplace/Include"))
  517.     (makedir (tackon #dest "Laplace/Libs"))
  518.     (makedir (tackon #dest "Laplace/Presets"))
  519.     (makedir (tackon #dest "Laplace/Projects"))
  520.     (makedir (tackon #dest "Laplace/Tools"))
  521.  
  522.     (working #copy-icons)
  523.  
  524.     (copyfiles
  525.         (source "T:Laplace_temp/Drawer1.info")
  526.         (dest #dest)
  527.         (newname "Laplace.info")
  528.         (nogauge)
  529.     )
  530.  
  531.     (copyfiles
  532.         (source "T:Laplace_temp/")
  533.         (pattern "~(def_#?.info|Drawer?.info)")
  534.         (dest (tackon #dest "Laplace"))
  535.         (nogauge)
  536.     )
  537.  
  538.     (working #copy-more)
  539.  
  540.     (copyfiles
  541.         (source "Tools/MuchMore")
  542.         (dest (tackon #dest "Laplace/c"))
  543.         (nogauge)
  544.     )
  545.  
  546.     ; main part
  547.     (if (in #parts 0)
  548.         (
  549.             (P_UNPACK #unpack-main "Data/Main.lha" (tackon #dest "Laplace/"))
  550.             (P_UNPACK #unpack-libs "Data/Libs.lha" (tackon #dest "Laplace/Libs/"))
  551.         )
  552.     )
  553.  
  554.     ; docs
  555.     (if (in #parts 1)
  556.         (
  557.             (P_UNPACK #unpack-docs "Data/Docs.lha" (tackon #dest "Laplace/Docs/"))
  558.  
  559.             (working #copy-icons)
  560.             (copyfiles
  561.                 (source "T:Laplace_temp/Docs/")
  562.                 (pattern "(History|Readme.mui).info")
  563.                 (dest (tackon #dest "Laplace/Docs"))
  564.                 (nogauge)
  565.             )
  566.  
  567.             (if (in #langs 0)
  568.                 (
  569.                     (makedir (tackon #dest "Laplace/Docs/english"))
  570.                     (copyfiles
  571.                         (source "Data/Docs_english_files")
  572.                         (dest (tackon #dest "Laplace/Docs/english"))
  573.                         (newname "Files")
  574.                         (noposition)
  575.                         (nogauge)
  576.                     )
  577.  
  578.                     (working #copy-icons)
  579.                     (copyfiles
  580.                         (source "T:Laplace_temp/Drawer2.info")
  581.                         (dest (tackon #dest "Laplace/Docs"))
  582.                         (newname "english.info")
  583.                         (noposition)
  584.                         (nogauge)
  585.                     )
  586.  
  587.                     (if (in #docs 0)
  588.                         (
  589.                             (P_UNPACK #unpack-docs "Data/Docs_english_guide.lha" (tackon #dest "Laplace/Docs/english/"))
  590.                             (working #copy-icons)
  591.                             (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.info" (tackon #dest "Laplace/Docs/english") "ARexx.info")
  592.                             (P_COPYAS "T:Laplace_temp/Docs/english/Functions.info" (tackon #dest "Laplace/Docs/english") "Functions.info")
  593.                             (P_COPYAS "T:Laplace_temp/Docs/english/Manual.info" (tackon #dest "Laplace/Docs/english") "Manual.info")
  594.                         )
  595.                     )
  596.  
  597.                     (if (in #docs 1)
  598.                         (
  599.                             (P_UNPACK #unpack-docs "Data/Docs_english_doc.lha" (tackon #dest "Laplace/Docs/english/"))
  600.                             (working #copy-icons)
  601.                             (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.doc.info" (tackon #dest "Laplace/Docs/english") "ARexx.doc.info")
  602.                             (P_COPYAS "T:Laplace_temp/Docs/english/Functions.doc.info" (tackon #dest "Laplace/Docs/english") "Functions.doc.info")
  603.                             (P_COPYAS "T:Laplace_temp/Docs/english/Manual.doc.info" (tackon #dest "Laplace/Docs/english") "Manual.doc.info")
  604.                         )
  605.                     )
  606.  
  607.                     (if (in #docs 2)
  608.                         (
  609.                             (P_UNPACK #unpack-docs "Data/Docs_english_dvi.lha" (tackon #dest "Laplace/Docs/english/"))
  610.                             (working #copy-icons)
  611.                             (P_COPYAS "T:Laplace_temp/Docs/english/Manual.dvi.info" (tackon #dest "Laplace/Docs/english") "Manual.dvi.info")
  612.                         )
  613.                     )
  614.                 )
  615.             )
  616.             (if (in #langs 1)
  617.                 (
  618.                     (makedir (tackon #dest "Laplace/Docs/deutsch"))
  619.                     (copyfiles
  620.                         (source "Data/Docs_deutsch_files")
  621.                         (dest (tackon #dest "Laplace/Docs/deutsch"))
  622.                         (newname "Files")
  623.                         (noposition)
  624.                         (nogauge)
  625.                     )
  626.  
  627.                     (working #copy-icons)
  628.                     (copyfiles
  629.                         (source "T:Laplace_temp/Drawer2.info")
  630.                         (dest (tackon #dest "Laplace/Docs"))
  631.                         (newname "deutsch.info")
  632.                         (noposition)
  633.                         (nogauge)
  634.                     )
  635.  
  636.                     (if (in #docs 0)
  637.                         (
  638.                             (P_UNPACK #unpack-docs "Data/Docs_deutsch_guide.lha" (tackon #dest "Laplace/Docs/deutsch/"))
  639.                             (working #copy-icons)
  640.                             (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.info" (tackon #dest "Laplace/Docs/deutsch") "ARexx.info")
  641.                             (P_COPYAS "T:Laplace_temp/Docs/english/Functions.info" (tackon #dest "Laplace/Docs/deutsch") "Funktionen.info")
  642.                             (P_COPYAS "T:Laplace_temp/Docs/english/Manual.info" (tackon #dest "Laplace/Docs/deutsch") "Anleitung.info")
  643.                         )
  644.                     )
  645.  
  646.                     (if (in #docs 1)
  647.                         (
  648.                             (P_UNPACK #unpack-docs "Data/Docs_deutsch_doc.lha" (tackon #dest "Laplace/Docs/deutsch/"))
  649.                             (working #copy-icons)
  650.                             (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.doc.info" (tackon #dest "Laplace/Docs/deutsch") "ARexx.doc.info")
  651.                             (P_COPYAS "T:Laplace_temp/Docs/english/Functions.doc.info" (tackon #dest "Laplace/Docs/deutsch") "Funktionen.doc.info")
  652.                             (P_COPYAS "T:Laplace_temp/Docs/english/Manual.doc.info" (tackon #dest "Laplace/Docs/deutsch") "Anleitung.doc.info")
  653.                         )
  654.                     )
  655.  
  656.                     (if (in #docs 2)
  657.                         (
  658.                             (P_UNPACK #unpack-docs "Data/Docs_deutsch_dvi.lha" (tackon #dest "Laplace/Docs/deutsch/"))
  659.                             (working #copy-icons)
  660.                             (P_COPYAS "T:Laplace_temp/Docs/english/Manual.dvi.info" (tackon #dest "Laplace/Docs/deutsch") "Anleitung.dvi.info")
  661.                         )
  662.                     )
  663.                 )
  664.             )
  665.         )
  666.     )
  667.  
  668.     ; catalogs
  669.     (if (in #parts 2)
  670.         (
  671.             (if (in #langs 1)
  672.                 (
  673.                     (makedir (tackon #dest "Laplace/Catalogs/deutsch"))
  674.                     (P_UNPACK #unpack-cat "Data/Catalogs_deutsch.lha" (tackon #dest "Laplace/Catalogs/deutsch/"))
  675.                 )
  676.             )
  677.         )
  678.     )
  679.  
  680.     ; icons
  681.     (if (in #parts 3)
  682.         (copyfiles
  683.             (source "T:Laplace_temp/")
  684.             (pattern "def_#?.info")
  685.             (dest (tackon #dest "Laplace/Icons"))
  686.             (nogauge)
  687.         )
  688.     )
  689.  
  690.     ; fonts
  691.     (if (in #parts 4)
  692.         (P_UNPACK #unpack-fonts "Data/Fonts.lha" (tackon #dest "Laplace/Fonts/"))
  693.     )
  694.  
  695.     ; arexx scripts
  696.     (if (in #parts 5)
  697.         (
  698.             (P_UNPACK #unpack-arexx "Data/ARexx.lha" (tackon #dest "Laplace/ARexx/"))
  699.             (working #copy-icons)
  700.             (foreach (tackon #dest "Laplace/ARexx") "#?"
  701.                 (copyfiles
  702.                     (source "T:Laplace_temp/def_ARexx.info")
  703.                     (dest (tackon #dest "Laplace/ARexx"))
  704.                     (newname (cat @each-name ".info"))
  705.                     (noposition)
  706.                     (nogauge)
  707.                 )
  708.             )
  709.         )
  710.     )
  711.  
  712.     ; include
  713.     (if (in #parts 6)
  714.         (
  715.             (P_UNPACK #unpack-include "Data/Include.lha" (tackon #dest "Laplace/Include/"))
  716.             (working #copy-icons)
  717.             (foreach (tackon #dest "Laplace/Include") "#?"
  718.                 (copyfiles
  719.                     (source "T:Laplace_temp/def_Include.info")
  720.                     (dest (tackon #dest "Laplace/Include"))
  721.                     (newname (cat @each-name ".info"))
  722.                     (noposition)
  723.                     (nogauge)
  724.                 )
  725.             )
  726.         )
  727.     )
  728.  
  729.     ; presets
  730.     (if (in #parts 7)
  731.         (
  732.             (P_UNPACK #unpack-presets "Data/Presets.lha" (tackon #dest "Laplace/Presets/"))
  733.             (working #copy-icons)
  734.             (foreach (tackon #dest "Laplace/Presets") "#?"
  735.                 (copyfiles
  736.                     (source "T:Laplace_temp/def_Preset.info")
  737.                     (dest (tackon #dest "Laplace/Presets"))
  738.                     (newname (cat @each-name ".info"))
  739.                     (noposition)
  740.                     (nogauge)
  741.                 )
  742.             )
  743.         )
  744.     )
  745.  
  746.     ; projects
  747.     (if (in #parts 8)
  748.         (
  749.             (P_UNPACK #unpack-projects "Data/Projects.lha" (tackon #dest "Laplace/Projects/"))
  750.             (working #copy-icons)
  751.             (foreach (tackon #dest "Laplace/Projects") "#?"
  752.                 (copyfiles
  753.                     (source "T:Laplace_temp/def_Project.info")
  754.                     (dest (tackon #dest "Laplace/Projects"))
  755.                     (newname (cat @each-name ".info"))
  756.                     (noposition)
  757.                     (nogauge)
  758.                 )
  759.             )
  760.         )
  761.     )
  762.  
  763.     ; tools
  764.     (if (in #parts 9)
  765.         (
  766.             (P_UNPACK #unpack-tools "Data/Tools.lha" (tackon #dest "Laplace/Tools/"))
  767.             (working #copy-icons)
  768.             (copyfiles
  769.                 (source "T:Laplace_temp/Tools/PrintManual.info")
  770.                 (dest (tackon #dest "Laplace/Tools/"))
  771.                 (noposition)
  772.                 (nogauge)
  773.             )
  774.         )
  775.     )
  776.  
  777.     (delete "T:Laplace_temp" (all))
  778. )
  779. ;-2-
  780.  
  781. (procedure P_INSTALL
  782.     (message #share-info (all))
  783.  
  784.     (set @user-level #defuser-level)
  785.     (welcome #welcome)
  786.  
  787.     (P_INSTALL_CHECK)
  788.     (P_INSTALL_ASK)
  789.     (P_INSTALL_PERFORM)
  790.  
  791.     (run ("Tools/SetConfig PATH=\"%s\" VERSION=0.7" @default-dest))
  792.  
  793.     ; Finito
  794.     (complete 100)
  795.     (exit)
  796. )
  797. ;-2-
  798. ;-1- "P_REMOVE"
  799. (procedure P_REMOVE
  800.     ; get destination dir
  801.     (set #dest
  802.         (askdir
  803.             (prompt #deldir-prompt)
  804.             (help #deldir-help)
  805.             (default @default-dest)
  806.         )
  807.     )
  808.  
  809.     (if (= (substr #dest (- (strlen #dest) 8)) "/Laplace")
  810.         (set #dest (substr #dest 0 (- (strlen #dest) 8)))
  811.     )
  812.  
  813.     (if (= (substr #dest (- (strlen #dest) 9)) "/Laplace/")
  814.         (set #dest (substr #dest 0 (- (strlen #dest) 9)))
  815.     )
  816.  
  817.     (if (= (exists (tackon #dest "Laplace") (noreq)) 2)
  818.         (if (= (askbool
  819.                     (prompt #confirm-prompt)
  820.                     (help #confirm-help)
  821.                )
  822.                1
  823.             )
  824.             (
  825.                 (working #deinstall-working)
  826.                 (delete (tackon #dest "Laplace") (all))
  827.                 (delete (tackon #dest "Laplace.info"))
  828.                 (delete "ENVARC:Laplace")
  829.                 (delete "ENV:Laplace")
  830.                 (message (#deinstall-finish #dest))
  831.             )
  832.         )
  833.         (message #deinstall-notfound)
  834.     )
  835.  
  836.     (exit (quiet))
  837. )
  838. ;-2-
  839.  
  840. ;-1- "main menu"
  841. (complete 0)
  842.  
  843. (if (exists "ENVARC:Laplace")
  844.     (
  845.         (run "Tools/GetConfig >ENV:Laplace_Version VERSION")
  846.         (run "Tools/GetConfig >ENV:Laplace_Path PATH")
  847.  
  848.         (set @default-dest (getenv "Laplace_Path"))
  849.         (set #old-version (getenv "Laplace_Version"))
  850.  
  851.         (set #defuser-level 0)
  852.  
  853.         (select (askchoice
  854.                     (prompt (#modeupdate-prompt #old-version @default-dest))
  855.                     (help #modeupdate-help)
  856.                     (choices #mode-update #mode-deinstall)
  857.                     (default 0)
  858.                 )
  859.                 (P_INSTALL)
  860.                 (P_REMOVE)
  861.         )
  862.     )
  863.     (
  864.         (set #defuser-level 1)
  865.  
  866.         (select (askchoice
  867.                     (prompt #mode-prompt)
  868.                     (help #mode-help)
  869.                     (choices #mode-install #mode-deinstall)
  870.                     (default 0)
  871.                 )
  872.                 (P_INSTALL)
  873.                 (P_REMOVE)
  874.         )
  875.     )
  876. )
  877. ;-2-
  878.  
  879.